/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

body {
  padding: 0;
  overflow: hidden;
}

html body.vscode-high-contrast.vscode-high-contrast > * {
  --button-primary-hover-background: var(--vscode-contrastBorder);
  --selected-commit-border: 1px solid var(--vscode-button-border);
}

.webview-view .isl-root {
  --background: var(--vscode-sideBar-background);
  outline: 1px solid var(--vscode-panel-border);
  outline-offset: -1px;
}

code {
  /* vscode webview default styling sets color to var(--vscode-textPreformat-foreground),
   which is an undesirably noticeable red color.
   Just unset this to reset to more browser-like style. */
  color: unset;
  background-color: unset;
}

/* Improve handling of the "Modern" themes, which have a particularly "loud" badge color. */
body[data-vscode-theme-id='Default Light Modern'] .commit-rows vscode-tag::part(control),
body[data-vscode-theme-id='Default Dark Modern'] .commit-rows vscode-tag::part(control) {
  background-color: var(--vscode-tab-unfocusedHoverBackground);
  color: var(--vscode-tab-activeForeground);
}

body[data-vscode-theme-kind='vscode-high-contrast'] .inline-badge.badge-primary {
  background-color: var(--background);
  outline: 1px solid var(--vscode-button-border);
}

/* Match VS Code Webview UI Toolkit variables with vscode theme colors. */
body {
  --background: var(--vscode-editor-background);
  --focus-border: var(--vscode-focusBorder);
  --foreground: var(--vscode-foreground);
  --scrollbar-slider-background: var(--vscode-scrollbarSlider-background);
  --scrollbar-slider-hover-background: var(--vscode-scrollbarSlider-hoverBackground);
  --scrollbar-slider-active-background: var(--vscode-scrollbarSlider-activeBackground);
  --badge-background: var(--vscode-badge-background);
  --badge-foreground: var(--vscode-badge-foreground);
  --button-border: var(--vscode-button-border);
  /* --button-icon-background: var(--vscode-button-icon-background);
  --button-icon-hover-background: var(--vscode-button-icon-hover-background); */
  --button-primary-background: var(--vscode-button-background);
  --button-primary-foreground: var(--vscode-button-foreground);
  --button-primary-hover-background: var(--vscode-button-hoverBackground);
  --button-secondary-background: var(--vscode-button-secondaryBackground);
  --button-secondary-foreground: var(--vscode-button-secondaryForeground);
  --button-secondary-hover-background: var(--vscode-button-secondaryHoverBackground);
  --checkbox-background: var(--vscode-checkbox-background);
  --checkbox-border: var(--vscode-checkbox-border);
  --checkbox-foreground: var(--vscode-checkbox-foreground);
  --list-active-selection-background: var(--vscode-list-activeSelectionBackground);
  --list-active-selection-foreground: var(--vscode-list-activeSelectionForeground);
  --list-hover-background: var(--vscode-list-hoverBackground);
  --divider-background: var(--vscode-settings-dropdownListBorder);
  --dropdown-background: var(--vscode-dropdown-background);
  --dropdown-border: var(--vscode-dropdown-border);
  --dropdown-foreground: var(--vscode-dropdown-foreground);
  --input-background: var(--vscode-input-background);
  --input-foreground: var(--vscode-input-foreground);
  --input-placeholder-foreground: var(--vscode-input-placeholderForeground);
  --link-active-foreground: var(--vscode-textLink-activeForeground);
  --link-foreground: var(--vscode-textLink-foreground);
  --progress-background: var(--vscode-progressBar-background);
  --panel-tab-active-border: var(--vscode-panelTitle-activeBorder);
  --panel-tab-active-foreground: var(--vscode-panelTitle-activeForeground);
  --panel-tab-foreground: var(--vscode-panelTitle-inactiveForeground);
  --panel-view-background: var(--vscode-panel-background);
  --panel-view-border: var(--vscode-panel-border);
}
